﻿using Abp.Application.Services;
using Magicodes.WeChat.Application.Authorization.Dto;
using Magicodes.WeChat.SDK.Apis.OAuth;
using Magicodes.WeChat.User.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Magicodes.WeChat.Application.Authorization
{
    public interface IWeChatAuthorizationAppService: IApplicationService
    {
        /// <summary>
        /// 获取网页授权链接[第一步]
        /// </summary>
        /// <param name="input">相关参数</param>
        /// <returns>网页授权链接</returns>
        Task<string> GetAuthorizeUrl(GetAuthorizeUrlInput input);

        /// <summary>
        /// 获取oauthAccessToken[第二步]
        /// </summary>
        /// <returns></returns>
        Task<OAuthTokenApiResult> GetOAuthToken(GetOAuthTokenInput input);


        /// <summary>
        ///  拉取用户信息(需scope为 snsapi_userinfo)[第三步]
        /// </summary>
        /// <returns>用户信息</returns>
        Task<WeChatUserListDto> GetUserInfo(GetUserInfoInput input);
    }
}
